#include<iostream>
#include<algorithm>
#include<iomanip>
#include<cmath>
using namespace std;
int main()
{
	double x1,y1,x2,y2,x3,y3,x4,y4;
	while (cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3 >> x4 >> y4) {
		double n1, m1, n2, m2, n3, m3, n4, m4;
		double w1, h1, w2, h2;
		n1 = min(x1, x2);
		m1 = min(y1, y2);
		n2 = max(x1, x2);
		m2 = max(y1, y2);
		n3 = min(x3, x4);
		m3 = min(y3, y4);
		n4 = max(x3, x4);
		m4 = max(y3, y4);
		if (n1 > n4 || n3 > n2 || m1 > m4 || m2 < m3) {
			cout << 0.00 << endl;
		}
		else {
			double w1, h1, w2, h2;
			w1 = max(n1, n3);
			h1 = max(m1, m3);
			w2 = min(n2, n4);
			h2 = min(m2, m4);
			double area = abs(w1 - w2) * abs(h1 - h2);
			cout << fixed << setprecision(2) << area << endl;
		}
	
	}
	return 0;
}